# Maintainer: Sergej Pupykin <pupykin.s+arch@gmail.com>
# Maintainer: Charles Mauch <cmauch@gmail.com>

pkgname=perl-ical-parser
pkgver=1.21
pkgrel=9
pkgdesc="Perl/CPAN Module iCal::Parser : Parse iCalendar files into a data structure"
arch=("any")
url="https://search.cpan.org/dist/iCal-Parser"
license=("GPL" "PerlArtistic")
makedepends=("perl-io-string" "perl-datetime-format-ical" "perl-text-vfile-asdata")
depends=("perl-freezethaw" "perl-io-string" "perl-datetime-format-ical" "perl-text-vfile-asdata")
source=("https://search.cpan.org/CPAN/authors/id/R/RI/RIXED/iCal-Parser-$pkgver.tar.gz")
sha256sums=('0d7939a644a8e67017ec7239d3d9604f3986bb9a4ff80be68fe7299ebfd2270c')

build() {
  cd "$srcdir"/iCal-Parser-$pkgver
  PERL_MM_USE_DEFAULT=1 perl Makefile.PL INSTALLDIRS=vendor
  make
}

package() {
  cd "$srcdir"/iCal-Parser-$pkgver
  make install DESTDIR="$pkgdir"
  find "$pkgdir" -name '.packlist' -delete
  find "$pkgdir" -name '*.pod' -delete
}
